<template>
  <ele-card body-class="py-12px" class="mb-10px!">
    <el-page-header @back="emit('back')">
      <template #content>
        <div>{{ title }}</div>
      </template>
      <template #extra>
        <el-link underline="never" @click="onClose === undefined ? emit('back') : emit('close')"><el-icon class="flex" :size="24"><IconElCircleClose /></el-icon></el-link>
      </template>
    </el-page-header>
  </ele-card>
</template>

<script setup>
defineProps({
  title: String,
  onClose: Function,
})
const emit = defineEmits(['back', 'close'])
</script>

<style lang="scss" scoped>

</style>
